import 'package:equatable/equatable.dart';
import 'package:website.core/core/application/blocs/app_navigator_bloc/models/page_models/app_navigator_page_model.dart';

class AccountPageModel extends AppNavigatorPageModel {
  AccountPageModel({
    required this.fragmentModel,
  }) : super(
          permittedWithAuthorization: true,
          permittedWithoutAuthorization: false,
        );

  final AccountPageFragmentModel fragmentModel;

  @override
  List<Object?> get props {
    return [
      ...super.props,
      fragmentModel,
    ];
  }

  AccountPageModel copyWith({
    AccountPageFragmentModel Function()? fragmentModel,
  }) {
    return AccountPageModel(
      fragmentModel: fragmentModel == null ? this.fragmentModel : fragmentModel(),
    );
  }
}

abstract class AccountPageFragmentModel extends Equatable {
  const AccountPageFragmentModel();
}

class AccountOverviewAccountPageFragmentModel extends AccountPageFragmentModel {
  const AccountOverviewAccountPageFragmentModel();

  @override
  List<Object?> get props => [];
}

class PurchaseManagementAccountPageFragmentModel extends AccountPageFragmentModel {
  const PurchaseManagementAccountPageFragmentModel();

  @override
  List<Object?> get props => [];
}

class TransactionHistoryAccountPageFragmentModel extends AccountPageFragmentModel {
  const TransactionHistoryAccountPageFragmentModel();

  @override
  List<Object?> get props => [];
}

class PaymentMethodAccountPageFragmentModel extends AccountPageFragmentModel {
  const PaymentMethodAccountPageFragmentModel();

  @override
  List<Object?> get props => [];
}
